{include file="../application/mobile/view/header.html" /}
</head>
<body>

<div class="bui-page">
    <header class="bui-bar">
        <div class="bui-bar-left">
            <a class="bui-btn" onclick="bui.back();"><i class="icon-back"></i></a>
        </div>
        <div class="bui-bar-main">{$policy.policy}</div>
        <div class="bui-bar-right">
            <!-- 右边按钮位置 -->
            <a class="bui-btn" id="download_attachment"><i class="icon-down">&#xe666;</i></a>
        </div>
    </header>
    <main>
        <!-- 正文内容 -->
        <h4>文件:{$policy.policy}</h4>
		<p>创建人:{$policy.createdwho}</p>
		<p>创建时间:{$policy.created | date="Y-m-d",###}</p>
		{$policy.content}
    </main>
    <footer>
        <!-- 底部内容 此处内容固定在页面底部 -->
    </footer>
    <!-- 自定义弹出菜单结构	 -->
<div id="actionsheet" class="bui-actionsheet actionsheet-custom" style="display: none">
	<div class="bui-btn" id="close">关闭</div>
	<ul class="bui-nav-icon bui-fluid-3">
		{volist name="policy.attachments" id="attachment"}
	    <li class="bui-btn" href="/index.php/app/policy/download_attachment?file_path={$attachment.path}">
	        <i class="iconfont icon-shuben"></i>{$attachment.name}
	    </li>
	    {/volist}
	</ul>
</div>
</div>

{include file="../application/mobile/view/footer.html" /}
<script>
        bui.ready(function () {
        	bui.btn({id:".bui-page",handle:".bui-btn,a"}).load();
        	 var dialog = bui.dialog({
		            id: "#actionsheet",
		            position:"bottom",
		            effect:"fadeInUp",
		            onMask: function (argument) {
		                dialog.close();
		            }
		        });
		    
		    $('#download_attachment').on("click",function (argument) {
		        dialog.open();
		    });
		    $('#close').on("click",function (argument) {
		        dialog.close();
		    });


    
 });
    

</script>
</body>
</html>